Optimal. Leaf size=171 \[ \frac{i 2^{-m-2} e^{-2 i \left (e-\frac{c f}{d}\right )} (c+d x)^m \left (\frac{i f (c+d x)}{d}\right )^{-m} \text{Gamma}\left (m+1,\frac{2 i f (c+d x)}{d}\right )}{a^2 f}+\frac{i 4^{-m-2} e^{-4 i \left (e-\frac{c f}{d}\right )} (c+d x)^m \left (\frac{i f (c+d x)}{d}\right )^{-m} \text{Gamma}\left (m+1,\frac{4 i f (c+d x)}{d}\right )}{a^2 f}+\frac{(c+d x)^{m+1}}{4 a^2 d (m+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.184187, antiderivative size = 171, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {3729, 2181} \[ \frac{i 2^{-m-2} e^{-2 i \left (e-\frac{c f}{d}\right )} (c+d x)^m \left (\frac{i f (c+d x)}{d}\right )^{-m} \text{Gamma}\left (m+1,\frac{2 i f (c+d x)}{d}\right )}{a^2 f}+\frac{i 4^{-m-2} e^{-4 i \left (e-\frac{c f}{d}\right )} (c+d x)^m \left (\frac{i f (c+d x)}{d}\right )^{-m} \text{Gamma}\left (m+1,\frac{4 i f (c+d x)}{d}\right )}{a^2 f}+\frac{(c+d x)^{m+1}}{4 a^2 d (m+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3729
Rule 2181
Rubi steps
\begin{align*} \int \frac{(c+d x)^m}{(a+i a \tan (e+f x))^2} \, dx &=\int \left (\frac{(c+d x)^m}{4 a^2}+\frac{e^{-2 i e-2 i f x} (c+d x)^m}{2 a^2}+\frac{e^{-4 i e-4 i f x} (c+d x)^m}{4 a^2}\right ) \, dx\\ &=\frac{(c+d x)^{1+m}}{4 a^2 d (1+m)}+\frac{\int e^{-4 i e-4 i f x} (c+d x)^m \, dx}{4 a^2}+\frac{\int e^{-2 i e-2 i f x} (c+d x)^m \, dx}{2 a^2}\\ &=\frac{(c+d x)^{1+m}}{4 a^2 d (1+m)}+\frac{i 2^{-2-m} e^{-2 i \left (e-\frac{c f}{d}\right )} (c+d x)^m \left (\frac{i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac{2 i f (c+d x)}{d}\right )}{a^2 f}+\frac{i 4^{-2-m} e^{-4 i \left (e-\frac{c f}{d}\right )} (c+d x)^m \left (\frac{i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac{4 i f (c+d x)}{d}\right )}{a^2 f}\\ \end{align*}
Mathematica [A] time = 38.0859, size = 192, normalized size = 1.12 \[ \frac{(c+d x)^m \sec ^2(e+f x) (\cos (f x)+i \sin (f x))^2 \left (i 4^{-m} e^{\frac{4 i c f}{d}-2 i e} \left (\frac{i f (c+d x)}{d}\right )^{-m} \text{Gamma}\left (m+1,\frac{4 i f (c+d x)}{d}\right )+i 2^{2-m} e^{\frac{2 i c f}{d}} \left (\frac{i f (c+d x)}{d}\right )^{-m} \text{Gamma}\left (m+1,\frac{2 i f (c+d x)}{d}\right )+\frac{4 e^{2 i e} f (c+d x)}{d (m+1)}\right )}{16 f (a+i a \tan (e+f x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.118, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( dx+c \right ) ^{m}}{ \left ( a+ia\tan \left ( fx+e \right ) \right ) ^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{{\left (d m + d\right )} \int{\left (d x + c\right )}^{m} \cos \left (4 \, f x + 4 \, e\right )\,{d x} + 2 \,{\left (d m + d\right )} \int{\left (d x + c\right )}^{m} \cos \left (2 \, f x + 2 \, e\right )\,{d x} -{\left (i \, d m + i \, d\right )} \int{\left (d x + c\right )}^{m} \sin \left (4 \, f x + 4 \, e\right )\,{d x} -{\left (2 i \, d m + 2 i \, d\right )} \int{\left (d x + c\right )}^{m} \sin \left (2 \, f x + 2 \, e\right )\,{d x} + e^{\left (m \log \left (d x + c\right ) + \log \left (d x + c\right )\right )}}{4 \,{\left (a^{2} d m + a^{2} d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.67203, size = 354, normalized size = 2.07 \begin{align*} \frac{{\left (i \, d m + i \, d\right )} e^{\left (-\frac{d m \log \left (\frac{4 i \, f}{d}\right ) + 4 i \, d e - 4 i \, c f}{d}\right )} \Gamma \left (m + 1, \frac{4 i \, d f x + 4 i \, c f}{d}\right ) +{\left (4 i \, d m + 4 i \, d\right )} e^{\left (-\frac{d m \log \left (\frac{2 i \, f}{d}\right ) + 2 i \, d e - 2 i \, c f}{d}\right )} \Gamma \left (m + 1, \frac{2 i \, d f x + 2 i \, c f}{d}\right ) + 4 \,{\left (d f x + c f\right )}{\left (d x + c\right )}^{m}}{16 \,{\left (a^{2} d f m + a^{2} d f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (d x + c\right )}^{m}}{{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]